<template>
	<view class="box">
		<view class="" v-if="name=='报修'">
			<view class="" style="padding: 20rpx;">
				<u-input type="textarea" placeholder="请描述报修问题" height="700"></u-input>
			</view>
				
			<view class="bt" @click="baoxiu">
				提交保修
			</view>	
			<view class="bc" @click="back">
				返回
			</view>
		</view>
		<view class="ac" v-if="name=='公告'">
			<image src="https://web.78keji.cn/images/yundian/not.png" mode="widthFix" style="width: 70%;"></image>
			<view class="bcs" @click="back">
				返回
			</view>
			<view class="bcs" @click="ban">
				半屏拉小蓝
			</view>
		</view>
		<view class="boss" v-if="name=='一键开门'">
			<image src="https://web.78keji.cn/images/yundian/open.png" mode="widthFix" style="width: 100%;"></image>
			<view class="bt" @click="opens">
				立即开门
			</view>	
			<view class="bcss" @click="back">
				返回
			</view>
		</view>
	
			
	

	</view>
</template>

<script setup>
	 export default {
			data() {
				return {
	name:'',
				};
			},
			methods: {
				ban(){
			my.openEmbeddedMiniProgram ({
			      appId: '2021004129621025',
			      path: 'pages/newindex/newindex',
			      extraData:{
			        "data1":"test"
			      },
			      success: (res) => {
			        console.log(JSON.stringify(res))
			      },
			      fail: (res) => {
			        console.log(JSON.stringify(res))
			      }
			    });
				},
				baoxiu(){
					console.log(111)
					uni.showToast({
						title: '暂无权限，请联系物业开通',
						icon: 'none', //将值设置为 success 或者 ''
						duration: 2000 //持续时间为 2秒
					})
				},
				back() {
					uni.navigateTo({
						url:'/pages/index/index'
					})
				},
				opens(){
					uni.showToast({
						title: '暂无权限，请联系物业开通',
						icon: 'none', //将值设置为 success 或者 ''
						duration: 2000 //持续时间为 2秒
					})
				}
			},
			onLoad(option) {
				this.name=option.name
	console.log(option.name)
			},
			onShow(){
				
			}
		}
		
</script>

<style lang="scss" scoped>
.bt{
	
	display: flex;
	align-items: center;
	justify-content: center;
	width: 664rpx;
	height: 94rpx;
	background: #2680FD;
	border-radius: 47rpx;
	font-size: 31rpx;
	font-weight: 800;
	color: #FFFFFF;
	margin: 0 auto;
	margin-top: 50rpx;
}
.ac{
	
text-align: center;
margin-top: 300rpx;
	
}
.boss{
	height: 100vh;
	background-color: white;
}
.bc{
	
display: flex;
	align-items: center;
	justify-content: center;
	width: 664rpx;
	height: 94rpx;
	background: #FFFFFF;
	border-radius: 47rpx;
	font-size: 31rpx;
	font-weight: 800;
	color: #2680FD;
	border: 1px solid #2680FD;
	margin: 0 auto;
	margin-top: 34rpx;
}
.bcs{
	
display: flex;
	align-items: center;
	justify-content: center;
	width: 664rpx;
	height: 94rpx;
	background: #FFFFFF;
	border-radius: 47rpx;
	font-size: 31rpx;
	font-weight: 800;
	color: #2680FD;
	border: 1px solid #2680FD;
	margin: 0 auto;
	margin-top: 114rpx;
}
.bcss{
	display: flex;
		align-items: center;
		justify-content: center;
		width: 664rpx;
		height: 94rpx;
		background: #FFFFFF;
		border-radius: 47rpx;
		font-size: 31rpx;
		font-weight: 800;
		color: #2680FD;
		border: 1px solid #2680FD;
		margin: 0 auto;
		margin-top: 34rpx;
}
</style>